﻿using UnityEngine;
using UnityEngine.UI;//用到了多个UI  
using System.Collections;
using System.Collections.Generic;//按钮组将会用到C#的集合  

public class Ensure : MonoBehaviour
{

    public void Onclick()
    {
        float sudu1 = float.Parse(GameObject.Find("Canvas/Information(Clone)/InputField/Text").GetComponent<Text>().text);//这样就能直接获取输入框的输入内容 
        float sudu2 = float.Parse(GameObject.Find("Canvas/Information(Clone)/InputField2/Text").GetComponent<Text>().text);
        float zhiliang1 = float.Parse(GameObject.Find("Canvas/Information(Clone)/InputField1/Text").GetComponent<Text>().text);
        float zhiliang2 = float.Parse(GameObject.Find("Canvas/Information(Clone)/InputField3/Text").GetComponent<Text>().text);
        string Weather = GameObject.Find("Canvas/Information(Clone)/Weather/Label").GetComponent<Text>().text;

        string leixing = GameObject.Find("Canvas/Information(Clone)/Angletype/Label").GetComponent<Text>().text;
        string leixing1 = GameObject.Find("Canvas/Information(Clone)/Car1/Label").GetComponent<Text>().text;
        string leixing2 = GameObject.Find("Canvas/Information(Clone)/Car2/Label").GetComponent<Text>().text;




        PlayerPrefs.SetFloat("sudu1", sudu1);
        PlayerPrefs.SetFloat("sudu2", sudu2);
        PlayerPrefs.SetFloat("zhiliang1", zhiliang1);
        PlayerPrefs.SetFloat("zhiliang2", zhiliang2);

        PlayerPrefs.SetString("weather",Weather);
        PlayerPrefs.SetString("leixing", leixing);
        PlayerPrefs.SetString("leixing1", leixing1);
        PlayerPrefs.SetString("leixing2", leixing2);

        Application.LoadLevel("cae2");//切换到场景Output  
    }

}